package pojo;

import java.math.BigDecimal;

/**
 * 商品信息表
 */
public class Goods {
    private int id; //商品编号
    private String goods_name; //商品名称
    private String picture; //商品图片路径
    private BigDecimal price; //商品价格
    private int type_id; //商品类型
    private String detail; //商品详情描述

    public Goods() {
    }

    //全参构造器
    public Goods(int id, String goods_name, String picture, BigDecimal price, int type_id, String detail) {
        this.id = id;
        this.goods_name = goods_name;
        this.picture = picture;
        this.price = price;
        this.type_id = type_id;
        this.detail = detail;
    }

    //无id的构造器
    public Goods(String goods_name, String picture, BigDecimal price, int type_id, String detail) {
        this.goods_name = goods_name;
        this.picture = picture;
        this.price = price;
        this.type_id = type_id;
        this.detail = detail;
    }

    //无id、detail的构造器
    public Goods(String goods_name, String picture, BigDecimal price, int type_id) {
        this.goods_name = goods_name;
        this.picture = picture;
        this.price = price;
        this.type_id = type_id;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getType_id() {
        return type_id;
    }

    public void setType_id(int type_id) {
        this.type_id = type_id;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", goods_name='" + goods_name + '\'' +
                ", picture='" + picture + '\'' +
                ", price=" + price +
                ", type_id=" + type_id +
                ", detail='" + detail + '\'' +
                '}';
    }
}
